<?php

namespace BP\CompteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * BP\CompteBundle\Entity\Compte
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="BP\CompteBundle\Entity\CompteRepository")
 */
class Compte
{

    public function __construct() {
        $this->created_at = new \DateTime('now');
		$this->updated_at = new \DateTime('now');
		$this->deleted = 0;
		$this->mainCompte = 0;
    }

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="BP\CompteBundle\Entity\CompteManager", inversedBy="comptes")
     */
    protected $compteManager;
    
    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255)
     */
    private $name;

    /**
     * @var integer $value
     *
     * @ORM\Column(name="value", type="integer")
     */
    private $value;

    /**
     * @var integer $solde
     *
     * @ORM\Column(name="solde", type="integer")
     */
    private $solde;

    /**
     * @var datetime $created_at
     *
     * @ORM\Column(name="created_at", type="datetime")
     */
    private $created_at;

    /**
     * @var datetime $updated_at
     *
     * @ORM\Column(name="updated_at", type="datetime")
     */
    private $updated_at;

    /**
     * @var string $description
     *
     * @ORM\Column(name="description", type="string", length=255)
     */
    private $description;
    
    /**
     * @var boolean $mainCompte
     *
     * @ORM\Column(name="mainCompte", type="boolean")
     */
    private $mainCompte;
    
    /**
     * @var boolean $deleted
     *
     * @ORM\Column(name="deleted", type="boolean")
     */
    private $deleted = "0";
  

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set user_id
     *
     * @param integer $userId
     */
    public function setUserId($userId)
    {
        $this->user_id = $userId;
    }

    /**
     * Get user_id
     *
     * @return integer 
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * Set value
     *
     * @param integer $value
     */
    public function setValue($value)
    {
        $this->value = $value;
    }

    /**
     * Get value
     *
     * @return integer 
     */
    public function getValue()
    {
        return $this->value;
    }

    /**
     * Set solde
     *
     * @param integer $solde
     */
    public function setSolde($solde)
    {
        $this->solde = $solde;
    }

    /**
     * Get solde
     *
     * @return integer 
     */
    public function getSolde()
    {
        return $this->solde;
    }

    /**
     * Set created_at
     *
     * @param datetime $createdAt
     */
    public function setCreatedAt($createdAt)
    {
        $this->created_at = $createdAt;
    }

    /**
     * Get created_at
     *
     * @return datetime 
     */
    public function getCreatedAt()
    {
        return $this->created_at;
    }

    /**
     * Set updated_at
     *
     * @param datetime $updatedAt
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updated_at = $updatedAt;
    }

    /**
     * Get updated_at
     *
     * @return datetime 
     */
    public function getUpdatedAt()
    {
        return $this->updated_at;
    }

    /**
     * Set description
     *
     * @param string $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }
    
    /**
     * Set mainCompte
     *
     * @param boolean $mainCompte
     */
    public function setMainCompte($mainCompte)
    {
        $this->mainCompte = $mainCompte;
    }

    /**
     * Get mainCompte
     *
     * @return boolean 
     */
    public function getMainCompte()
    {
        return $this->mainCompte;
    }

    /**
     * Set deleted
     *
     * @param boolean $deleted
     */
    public function setDeleted($deleted)
    {
        $this->deleted = $deleted;
    }

    /**
     * Get deleted
     *
     * @return boolean 
     */
    public function getDeleted()
    {
        return $this->deleted;
    }

    /**
     * Set name
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->name = $name;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set compteManager
     *
     * @param BP\CompteBundle\Entity\CompteManager $compteManager
     */
    public function setCompteManager(\BP\CompteBundle\Entity\CompteManager $compteManager)
    {
        $this->compteManager = $compteManager;
    }

    /**
     * Get compteManager
     *
     * @return BP\CompteBundle\Entity\CompteManager 
     */
    public function getCompteManager()
    {
        return $this->compteManager;
    }
}